#include "Sound.h"

CSound::CSound(string path)
: mPath(path)
{
}

CSound::~CSound(void)
{
}

void CSound::Play()
{
    FMOD_System_PlaySound(mFmod, FMOD_CHANNEL_FREE, mSound, false, &mChannel);
}

void CSound::Stop()
{
    FMOD_Channel_Stop(mChannel);
}

void CSound::Create(FMOD_SYSTEM* fmod)
{
    mFmod = fmod;
    FMOD_System_CreateSound(mFmod, mPath.c_str(), FMOD_DEFAULT, 0, &mSound);
}